package com.ymttest.database.sqlwapper;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ymt.core.tool.Logger;
import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtFundDimension;
import com.ymttest.utils.EnvSetup;

/************************************************************************************
 * @File name : CreateReturnApplyBillWapper.java
 * @Author : 邓金姣
 * @Date : 2016年11月24日
 * @Copyright : 洋码头
 * 创建退货退款
 ************************************************************************************/
public class CreateReturnApplyBillWapper {
	SqlManager manage;

	
	public CreateReturnApplyBillWapper() {
		manage = new SqlManager("ymtstress");
		 
	}
	public List<Map> ioderidCatLogs() throws InterruptedException {
		List<Map> ioderidCatLogs = manage.getSelectResults("com.ymttest.database.mapping.CreateReturnApplyBillMapper.CreateReturnApplyBill",null);
		// manage.close();
		return ioderidCatLogs;
	}
	
	
	public List<Map> GetRefundBil(Map m) throws InterruptedException {
		List<Map> GetRefundBil = manage.getSelectResults("com.ymttest.database.mapping.CreateReturnApplyBillMapper.RefundBill", m );
		// manage.close();
		return GetRefundBil;
	}
	
	
	public List<Map> tuihuotuikuanRefundBill() throws InterruptedException {
		List<Map> GetRefundBil = manage.getSelectResults("com.ymttest.database.mapping.CreateReturnApplyBillMapper.tuihuotuikuanRefundBill", null );
		// manage.close();
		return GetRefundBil;
	}
	
	public static void main(String args[]) {
	    try {	          
	    	CreateReturnApplyBillWapper createReturnApplyBillWapper = new CreateReturnApplyBillWapper();
	    
	    	 List<Map> rm = createReturnApplyBillWapper.tuihuotuikuanRefundBill();
		     int  iOrderId = (Integer) rm.get(0).get("iOrderId");   //订单
		     Logger.debug(iOrderId);
		     
		        
		        
		        
	    	//List<Map> rm = createReturnApplyBillWapper.GetRefundBil(m);
	    
	    //	Logger.debug(rm.get(0).get("RefundBillNo"));
	    	 
//	    	for(Map map : rm){
//	    		
//	    		String RefundBillNo = String.valueOf(map.get("RefundBillNo"));
//	        	Logger.debug(RefundBillNo);  
//	    	}

//	        List<Map> rm = createReturnApplyBillWapper.ioderidCatLogs();
//
//	         int iOrderId = (Integer) rm.get(0).get("iOrderId");
//	         String sCatalogId=(String)rm.get(0).get("sCatalogId");
//	       System.out.println(iOrderId);
//	       System.out.println(sCatalogId);
	    } catch (InterruptedException e) {
	        e.printStackTrace(); 
	    }
	}
	
	
}
